-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add meridiem
function to ku locale
#1725
Conversation
Kurdish (ku) locale has it's own form of meridiem texts which are: `AM` -> `پ.ن` `PM` -> `د.ن` The logic of determining which should be chosen is identical to the main logic from the library, the only change is localized strings for each case. Also tests are added to the corresponding locale to ensure it gets formatted correctly.
Codecov Report
@@ Coverage Diff @@
## dev #1725 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 179 179
Lines 1996 1997 +1
Branches 507 508 +1
=========================================
+ Hits 1996 1997 +1
Continue to review full report at Codecov.
|
@@ -18,6 +18,7 @@ const locale = { | |||
LLL: 'D MMMM YYYY HH:mm', | |||
LLLL: 'dddd, D MMMM YYYY HH:mm' | |||
}, | |||
meridiem: hour => (hour < 12 ? 'پ.ن' : 'د.ن'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, should we keep the same with momentjs as https://github.com/moment/moment/blob/e96809208c9d1b1bbe22d605e76985770024de42/locale/ku.js#L76
meridiem: function (hour, minute, isLower) {
if (hour < 12) {
return 'بهیانی';
} else {
return 'ئێواره';
}
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @iamkun
Not sure if this was a question.
The rationale behind using پ.ن
instead of بەیانی
is that, it's short version of it, just as AM
.
Usually it's a preferred way of using those post-fixes with time in Kurdish language, not sure if we use بەیانی
and ئێوارە
whatsoever.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright, thanks for this explanation
# [1.11.0](v1.10.8...v1.11.0) (2022-03-14) ### Bug Fixes * Add Kirundi (rn) locale ([#1793](#1793)) ([74e5247](74e5247)) * add missing date shorthand D type definition ([#1752](#1752)) ([b045baf](b045baf)) * Add relative time to Galician (gl) and fix ordinals ([#1800](#1800)) ([dcbf170](dcbf170)) * update German locales (de-at, de-ch) ([#1775](#1775)) ([f9055a7](f9055a7)) * update Icelandic [is] locale relativeTime config ([#1796](#1796)) ([76f9e17](76f9e17)) * Update index.d.ts note ([#1716](#1716)) ([5a108ff](5a108ff)) * Update locale German [de] monthsShort ([#1746](#1746)) ([4a7b7d0](4a7b7d0)) * update meridiem function to Kurdish (ku) locale ([#1725](#1725)) ([efd3904](efd3904)) * update updateLocal plugin typescript types ([#1692](#1692)) ([c7a3f73](c7a3f73)) ### Features * Fallback to language only locale + support uppercase locales ([#1524](#1524)) ([9138dc2](9138dc2))
🎉 This PR is included in version 1.11.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [1.11.0](iamkun/dayjs@v1.10.8...v1.11.0) (2022-03-14) ### Bug Fixes * Add Kirundi (rn) locale ([#1793](iamkun/dayjs#1793)) ([74e5247](iamkun/dayjs@74e5247)) * add missing date shorthand D type definition ([#1752](iamkun/dayjs#1752)) ([b045baf](iamkun/dayjs@b045baf)) * Add relative time to Galician (gl) and fix ordinals ([#1800](iamkun/dayjs#1800)) ([dcbf170](iamkun/dayjs@dcbf170)) * update German locales (de-at, de-ch) ([#1775](iamkun/dayjs#1775)) ([f9055a7](iamkun/dayjs@f9055a7)) * update Icelandic [is] locale relativeTime config ([#1796](iamkun/dayjs#1796)) ([76f9e17](iamkun/dayjs@76f9e17)) * Update index.d.ts note ([#1716](iamkun/dayjs#1716)) ([5a108ff](iamkun/dayjs@5a108ff)) * Update locale German [de] monthsShort ([#1746](iamkun/dayjs#1746)) ([4a7b7d0](iamkun/dayjs@4a7b7d0)) * update meridiem function to Kurdish (ku) locale ([#1725](iamkun/dayjs#1725)) ([efd3904](iamkun/dayjs@efd3904)) * update updateLocal plugin typescript types ([#1692](iamkun/dayjs#1692)) ([c7a3f73](iamkun/dayjs@c7a3f73)) ### Features * Fallback to language only locale + support uppercase locales ([#1524](iamkun/dayjs#1524)) ([9138dc2](iamkun/dayjs@9138dc2))
# [1.11.0](iamkun/dayjs@v1.10.8...v1.11.0) (2022-03-14) ### Bug Fixes * Add Kirundi (rn) locale ([#1793](iamkun/dayjs#1793)) ([74e5247](iamkun/dayjs@74e5247)) * add missing date shorthand D type definition ([#1752](iamkun/dayjs#1752)) ([b045baf](iamkun/dayjs@b045baf)) * Add relative time to Galician (gl) and fix ordinals ([#1800](iamkun/dayjs#1800)) ([dcbf170](iamkun/dayjs@dcbf170)) * update German locales (de-at, de-ch) ([#1775](iamkun/dayjs#1775)) ([f9055a7](iamkun/dayjs@f9055a7)) * update Icelandic [is] locale relativeTime config ([#1796](iamkun/dayjs#1796)) ([76f9e17](iamkun/dayjs@76f9e17)) * Update index.d.ts note ([#1716](iamkun/dayjs#1716)) ([5a108ff](iamkun/dayjs@5a108ff)) * Update locale German [de] monthsShort ([#1746](iamkun/dayjs#1746)) ([4a7b7d0](iamkun/dayjs@4a7b7d0)) * update meridiem function to Kurdish (ku) locale ([#1725](iamkun/dayjs#1725)) ([efd3904](iamkun/dayjs@efd3904)) * update updateLocal plugin typescript types ([#1692](iamkun/dayjs#1692)) ([c7a3f73](iamkun/dayjs@c7a3f73)) ### Features * Fallback to language only locale + support uppercase locales ([#1524](iamkun/dayjs#1524)) ([9138dc2](iamkun/dayjs@9138dc2))
# [1.11.0](iamkun/dayjs@v1.10.8...v1.11.0) (2022-03-14) ### Bug Fixes * Add Kirundi (rn) locale ([#1793](iamkun/dayjs#1793)) ([74e5247](iamkun/dayjs@74e5247)) * add missing date shorthand D type definition ([#1752](iamkun/dayjs#1752)) ([b045baf](iamkun/dayjs@b045baf)) * Add relative time to Galician (gl) and fix ordinals ([#1800](iamkun/dayjs#1800)) ([dcbf170](iamkun/dayjs@dcbf170)) * update German locales (de-at, de-ch) ([#1775](iamkun/dayjs#1775)) ([f9055a7](iamkun/dayjs@f9055a7)) * update Icelandic [is] locale relativeTime config ([#1796](iamkun/dayjs#1796)) ([76f9e17](iamkun/dayjs@76f9e17)) * Update index.d.ts note ([#1716](iamkun/dayjs#1716)) ([5a108ff](iamkun/dayjs@5a108ff)) * Update locale German [de] monthsShort ([#1746](iamkun/dayjs#1746)) ([4a7b7d0](iamkun/dayjs@4a7b7d0)) * update meridiem function to Kurdish (ku) locale ([#1725](iamkun/dayjs#1725)) ([efd3904](iamkun/dayjs@efd3904)) * update updateLocal plugin typescript types ([#1692](iamkun/dayjs#1692)) ([c7a3f73](iamkun/dayjs@c7a3f73)) ### Features * Fallback to language only locale + support uppercase locales ([#1524](iamkun/dayjs#1524)) ([9138dc2](iamkun/dayjs@9138dc2))
Kurdish
ku
locale has it's own form of meridiem texts which are:AM
->پ.ن
PM
->د.ن
The logic of determining which should be chosen is identical
to the main logic from the library, the only change is localized
strings for each case.
Also tests are added to the corresponding locale to ensure it
gets formatted correctly.
Closes #1724